﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using LibService.DTO;
using LibService.DAO;

namespace LibService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService" in both code and config file together.
    [ServiceContract]
    public interface IService
    {
        #region 1. Xu ly Thong Tin Dich Vu
        [OperationContract]
        [WebGet(UriTemplate = "dichvu", ResponseFormat = WebMessageFormat.Json)]
        List<DichVuDTO> getDataDichVu();
        #endregion

        #region 2. Xu ly Thong Tin Du Lieu
        [OperationContract]
        [WebInvoke(Method="GET", UriTemplate = "dulieu/?format=json", ResponseFormat = WebMessageFormat.Json)]
        List<DuLieuDTO> getData();

        [OperationContract]
        [WebGet(UriTemplate = "dulieu/{maQuanHuyen}", ResponseFormat = WebMessageFormat.Json)]
        List<DuLieuDTO> getDateByID(String maQuanHuyen);

        [OperationContract]
        [WebInvoke(UriTemplate = "dulieu", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, Method = "POST")]
        bool Insert(DuLieuDTO dl);

        #endregion  

        #region 3. Xu Ly Thong Tin Phuong

        [OperationContract]
        [WebGet(UriTemplate = "phuong", ResponseFormat = WebMessageFormat.Json)]
        List<PhuongDTO> layThongTinPhuong();

        #endregion

        #region 4. Xu ly Thong Tin Quan Huyen

        [OperationContract]
        [WebGet(UriTemplate = "quanhuyen", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        List<QuanHuyenDTO> layThongTinQuanHuyen();

        #endregion

        #region 5. Xu ly Thong Tin Tinh Thanh

        [OperationContract]
        [WebGet(UriTemplate = "tinhthanh", ResponseFormat = WebMessageFormat.Json)]
        List<TinhThanhDTO> layThongTinTinhThanh();

        #endregion
    }
}
